<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<link rel="stylesheet" type="text/css" href="${contextPath}/resource/css/default.css" />
		<link rel="stylesheet" type="text/css" href="${contextPath}/resource/tree/zTreeStyle/zTreeStyle.css" />
		<script type="text/javascript" src="${contextPath}/resource/tree/jquery-1.4.2.js"></script>
		<script type="text/javascript" src="${contextPath}/resource/tree/jquery.ztree-2.6.js"></script>
		<script type="text/javascript" src="${contextPath}/resource/js/systemUtil.js"></script>
		<script type="text/javascript">
	function submitFrom(fm){
		if(document.getElementById("section.bkName").value ==""){
			alert("版块名不能为空 !");
			return;
		}
		if(document.getElementById("section.bkName").value.toString().length >30){
			alert("版块名称不能超过30个字符 !");
			return;
		}
		
		if(document.getElementById("section.bkZdyys").value ==""){
			alert("最大应用数不能为空 !");
			return;
		}else{
			var p = "^[0-9]*[1-9][0-9]*$";
			var flag = new RegExp(p).test(document.getElementById("section.bkZdyys").value);
			if(!flag){
				alert("输入的最大应用数必须为整数 !");
				return;
			}
		
		}
		fm.submit();
	}
</script>
</head>
<body>
	<s:form action="MobileAppManageAction_update.do" namespace="/mobile" method="post">
		<table class="menu_table">
			<s:hidden name="section.bkId" value="%{section.bkId}"></s:hidden>
			<s:hidden name="section.updateCircle.gxId" value="%{section.updateCircle.gxId}"></s:hidden>
			<s:hidden name="section.messageType.pxId" value="%{section.messageType.pxId}"></s:hidden>
			<tr>
				<th>
					<a href="MobileAppManageAction_list.do">手机应用管理</a>&gt;&gt;添加
				</th>
			</tr>
		</table>
		<div class="listtable">
			<div class="secondDiv">
				<table class="form_table">
					<tr>
						<th width="20%">
							版块名称
						</th>
						<td width="80%">
							<s:textfield name="section.bkName" id="section.bkName" size="20"
								maxlength="50" />
							<span class="txtblue" id="">*</span>
						</td>
					</tr>
					<tr>
						<th>
							最大应用数
						</th>
						<td>
							<s:textfield name="section.bkZdyys" id="section.bkZdyys"
								maxlength="50" size="20"></s:textfield>
							<span class="txtblue" id="">*</span>
						</td>
					</tr>
					<tr>
						<th>
							更新周期
						</th>
						<td>
							<s:select list="updateCircleMap" name="circleId" value="%{section.updateCircle.gxId}">
							</s:select>
						</td>
					</tr>
					<tr>
						<th>
							排序规则
						</th>
						<td>
							<s:select list="messageTypeMap" name="messageTypeId" value="%{section.messageType.pxId}">
							</s:select>
						</td>
					</tr>
				</table>
				
				<table width="80%" border="0" align="center" cellpadding="3" cellspacing="1">
					<s:token></s:token>
				    <tr>
				      <td align="center"  >
				      <div align="center">
				      	<input type="button" value="" class="apply_style" align="middle" onclick="submitFrom(this.form);"/>
				        <input type="button" onclick="javascript:location='MobileAppManageAction_list.do'" class="back_style"  />
				        <input type="reset" id="重置 " class="reset_style" value=""/>
				        </div>
				        </td>
				    </tr>
				</table>
			</div>
		</div>
	</s:form>
</body>
</html>
